#include "EqualConstraint.h"
//Declare_Collections_IEnumerator(Object, object)
//Declare_Collections_IEnumerable(Object, object)
//Declare_Collections_ICollection(Object, object)

private bool space(NUnit_Constraints_EqualConstraint,ObjectsEqual)(NUnit_Constraints_EqualConstraint *t, object expected, object actual)
{
	System_Type *type;
	System_Type *type2;
	return true;
	if ((expected == null) && (actual == null))
    {
        return true;
    }
    if ((expected == null) || (actual == null))
    {
        return false;
    }
    type = object_getType(expected);
    type2 = object_getType(actual);
    //if (!((!type.IsArray || !type2.IsArray) || base.compareAsCollection))
    //{
    //    //return ArraysEqual((Array) expected, (Array) actual);
    //}
    if ((is(expected,Collections_ICollection(System_Object))) && (is(actual,Collections_ICollection(System_Object))))
    {
    //    return CollectionsEqual((ICollection) expected, (ICollection) actual);
    }
    //if ((is(expected,System_Stream) && (is(actual,System_Stream))))
    //{
    //    return StreamsEqual((Stream) expected, (Stream) actual);
    //}
    if (t->NUnit_Constraints_Constraint.compareWith != null)
    {
		//return (vcall(Collections_IComparer,t->NUnit_Constraints_Constraint.compareWith,Compare, expected, actual) == 0);
    }
    //if ((expected is DirectoryInfo) && (actual is DirectoryInfo))
    //{
    //    return this.DirectoriesEqual((DirectoryInfo) expected, (DirectoryInfo) actual);
    //}
    //if (Numerics.IsNumericType(expected) && Numerics.IsNumericType(actual))
    //{
    //    return Numerics.AreEqual(expected, actual, ref this.tolerance);
    //}
    if ((is(expected,System_String)) && (is(actual,System_String)))
    {
    //    return this.StringsEqual((string) expected, (string) actual);
    }
    //if (((expected is DateTime) && (actual is DateTime)) && (base.tolerance is TimeSpan))
    //{
    //    TimeSpan span = (TimeSpan) (((DateTime) expected) - ((DateTime) actual));
    //    return (span.Duration() <= ((TimeSpan) base.tolerance));
    //}
	return true;
    //return vcall(System_Object,expected,Equals, actual);
}

private_ bool Matches(NUnit_Constraints_Constraint *t, object actual)
{
	NUnit_Constraints_EqualConstraint *t2 = (NUnit_Constraints_EqualConstraint *)t;
	t->actual = actual;
	//t->failurePoints = new(,ArrayList);
	return space(NUnit_Constraints_EqualConstraint,ObjectsEqual)(t2, t2->expected, actual);
}

protected virtual_ bool space(NUnit_Constraints_EqualConstraint,ArraysEqual)(NUnit_Constraints_EqualConstraint *t, Array expected, Array actual)
{
	return false;
}

Implement_TypeV(NUnit_Constraints_EqualConstraint,NUnit_Constraints_Constraint,
	vtable[_NUnit_Constraints_EqualConstraintVIndex_ArraysEqual] = (System_ObjectVector)&space(NUnit_Constraints_EqualConstraint,ArraysEqual);
	vtable = t->NUnit_Constraints_Constraint.__vtable;
	vtable[_NUnit_Constraints_ConstraintVIndex_Matches] = (System_ObjectVector)&Matches;
)
Implement_Ctor(,NUnit_Constraints_EqualConstraint,
	baseCtor(,t,NUnit_Constraints_Constraint);
	t->expected = expected;
, object expected)

